import VueRouter from 'vue-router'
import home from './main/home.vue'
import member from './main/member.vue'
import cart from './main/cart.vue'
import search from './main/search.vue'
import newslist from './homeComponents/newslist.vue'
import news from './homeComponents/news/news.vue'

var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component: home},
        {path:'/member',component: member},
        {path:'/cart',component: cart},
        {path:'/search',component:search},
        {path:'/home/newsList',component:newslist},
        {path:'/home/newsInfo/:id',component:news}        
    ],
    linkActiveClass: 'mui-active' //在App.vue文件中，第一个home是永远高亮的，因为有一个 mui-active 类
                                  //所以可以将 linkActiveClass 设置为 mui-active 来设置高亮
})
export default router